Skip to content

fix: BED-10665 preserve organization role assignments without team descriptions - #112

Merged
jaredcatkinson merged 1 commit into
mainfrom
fix/BED-10665-preserve-org-role-assignments
Nov 20, 2026
Merged

jaredcatkinson merged 1 commit into
mainfrom
fix/BED-10665-preserve-org-role-assignments

Conversation

@jaredcatkinson

@jaredcatkinson jaredcatkinson commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Teams returned with null or missing descriptions previously failed OrgRoleTeam validation, discarding their custom organization role assignments. Accept an optional description so GH_HasRole edges are preserved while required assignment identifiers remain required.

Validation: 657 tests passed; Ruff and git diff --check passed. Regression coverage exercises null, missing, empty, and populated descriptions through the transformer, model validation, and edge generation, plus missing required identifiers.

Summary by CodeRabbit

  • Bug Fixes
    • Organization role teams can now be loaded when their description is missing or null, instead of requiring every team to have a description.
    • Existing descriptions, including empty or populated values, continue to be accepted. Required team and role identifiers and names remain validated, and loaded teams retain their role assignment relationship.

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

OrgRoleTeam.description is now optional and defaults to `None. Tests cover description values, role-assignment edges, the teams endpoint call, and validation of required assignment identifiers.

Changes

Organization-role team descriptions

Layer / File(s) Summary
Optional description and model coverage
src/openhound_github/models/org_role_team.py, tests/test_org_role_model.py
OrgRoleTeam.description defaults to None. Tests cover null, missing, empty, and populated descriptions, the HAS_ROLE edge, the teams endpoint call, and required assignment identifiers.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: eladshamir

Merge Risk: Minimal · up to 49b8a

Organization-role team assignments for teams without descriptions are now preserved instead of failing validation. No concrete merge risk was found.

Security architecture risk: Minimal · up to 49b8a

The change preserves role assignments when optional descriptive text is absent. Required assignment identifiers and graph-edge construction remain unchanged, and the inspected change establishes no introduced or worsened material security risk.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The directly affected security-relevant output is the representation of team-to-organization-role relationships. Downstream role analysis can now include assignments previously rejected solely for absent descriptions. The inspected path fetches assignments and constructs graph edges; it does not add a GitHub permission-management operation.

Trust Boundaries and Controls

  • observed — Remote team data still enters through the existing role-scoped fetch and model-validation path. Required fields establish field presence and type, not independent proof of organization ownership. The transformer spreads remote team keys after role context, so colliding keys could overwrite that context; this ordering predates the PR, and no newly reachable collision or authority escalation was established.
Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the fix and the affected behavior: organization role assignments are preserved when a team has no description. The changeset makes OrgRoleTeam.description optional (str | None = None) …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the fix and the affected behavior: organization role assignments are preserved when a team has no description. The changeset makes OrgRoleTeam.description optional (str | None = None) and adds tests for null, missing, empty, and populated descriptions, so the title matches the main change. The BED-10665 ticket reference is extra context and does not affect the match.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the role team’s name,
A missing note is still in frame.
Null or blank, the tests inspect,
Required IDs must stay correct.
The rabbit hops along its way.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3e0b349e-44f8-4bc4-9da3-53d3bba4c948
Commits

Reviewing files that changed from the base of the PR and between 6c9e2f8 and 49b8a20.

Files selected for processing: 2

  • src/openhound_github/models/org_role_team.py
  • tests/test_org_role_model.py

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@jaredcatkinson
jaredcatkinson merged commit ee3ec55 into main Nov 20, 2026
3 checks passed
@jaredcatkinson
jaredcatkinson deleted the fix/BED-10665-preserve-org-role-assignments branch November 20, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants